package org.boot.dao;

import org.boot.entity.Account;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface AccountDao extends JpaRepository<Account, Long> {

    @Query(value = "select c.* from account c where c.id = %?1 FOR UPDATE", nativeQuery = true)
    Account selectForUpdate(Long id);
}
